﻿<?xml version="1.0" encoding="utf-8" ?>

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="Helper.Core"
namespace="Helper.Core.Entity">

  <class name="Status" table="T_STATUS">

    <id name="Id" column="ISN_STATUS">
      <generator class="increment"></generator> 
    </id>

    <property name="Name" not-null="true" column="STANM_STATUS"/>

    <property name="Conclusive" not-null="true" column="STAFG_CONCLUSIVO" type="System.Boolean" />

    <property name="Dependency" column="STANR_DEPENDENCIA" type="System.Int32"/>

    <property name="Shown" column="STANR_MOSTRADO" type="System.Int32"/>

    <idbag name="PendingSectors" table="T_STATUS_SETOR" lazy="false">
      <collection-id column="ISN_STATUS_SETOR" type="System.Int32">
        <generator class="increment"/>
      </collection-id>
      <key column="ISN_STATUS"/>
      <many-to-many column="ISN_SETOR" class="Helper.Core.Entity.Sector" />
    </idbag>
    
    
  </class>
  
</hibernate-mapping>
